﻿@model COP4710.Models.DispatchModel
@using COP4710.Extensions;
@using COP4710.Controllers;
@{
    ViewBag.Title = "New Dispatch";
    ViewBag.PageTitle = ViewBag.Title;
}
@using (Html.BeginForm())
{
    @Html.ValidationSummary()

    <div class="Main" id="Main">
        <div class="Sidebar" id="sidebar">
            @Html.ActionLink("<< Forms", "Index", "Dispatch", null, new { @class = "Submit", @ID = "Back" })
            <ul id="sidebarLinks">
            </ul>
            <hr />
            <input type="submit" id="Submit" title="Submit" value="Submit" />
        </div>
        <div class="Content" id="content">
            @{
                Html.RenderPartial("Form", Model);
            }
        </div>
    </div>
}
<script type="text/javascript">

    $(function () {


        $('input, select, textarea').focus(function () {
            focusElement(this);
        });

        $('input, select, textarea').click(function () {
            focusElement(this);
        });

    });

    function focusElement(elem) {

        $('.focused').removeClass('focused');
        $(elem).addClass('focused');
    }
</script>
